package com.tony.pmp.model.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tony.pmp.model.entity.SysUserEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * @Title: SysUserMapper
 * @Auther: 皮蛋布丁
 * @Date: 2021/07/09/10:05
 * @Description: 系统用户
 */
@Mapper
public interface SysUserMapper extends BaseMapper<SysUserEntity> {

    /**
    * @Description: queryAllperms 根据userId获取用户的所有权限
    * @Param: [userId]
    * @return: java.util.List<java.lang.String>
    * @Author: 皮蛋布丁
    * @Date: 2021/7/28 17:34
    */
    List<String> queryAllperms(Long userId);

    /**
    * @Description: queryDeptIdsByUserId 根据userId获取分配给用户的部门数据权限id列表
    * @Param: [userId]
    * @return: java.util.Set<java.lang.Long>
    * @Author: 皮蛋布丁
    * @Date: 2021/7/29 14:53
    */
    Set<Long> queryDeptIdsByUserId(Long userId);

    /**
     * @Description: queryAllMenuId 查询用户的所有权限
     * @Param: [userId]
     * @return: java.util.List<java.lang.Long>
     * @Author: 皮蛋布丁
     * @Date: 2021/8/1 15:51
     */
    List<Long> queryAllMenuId(Long userId);

    int deleteByPrimaryKey(Long userId);

    int insert(SysUserEntity record);

    int insertSelective(SysUserEntity record);

    SysUserEntity selectByPrimaryKey(Long userId);

    int updateByPrimaryKeySelective(SysUserEntity record);

    int updateByPrimaryKey(SysUserEntity record);
}